package com.heima.task.job;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.Date;

/**
 * @author lo
 */
@Component
public class HelloJob {
    @Scheduled(cron = "0/5 * * * * ?")//不支持 第七个参数
    public void eat(){
        System.out.println("5秒中吃一次饭，我想成为一个胖子"+new Date());
    }
}